﻿<div [@routerTransition] id="app-contact">
    <div class="m-subheader">
        <div class="row align-items-center">
            <div class="mr-auto col-auto">
                <h3 class="m-subheader__title m-subheader__title--separator">
                    <span>任务分配</span>
                </h3>
                <span class="m-section__sub">
                    将任务分配到负责班组
                </span>
            </div>
        </div>
    </div>


    <div class="m-content">
              
                <div class="row">
                    <div class="col-xl-12">
                        <!--begin:: Widgets/Tasks -->
                        <div class="m-portlet m-portlet--full-height ">
                            <div class="m-portlet__head">
                                   
                                <div class="m-portlet__head-caption">
                                    <div class="m-portlet__head-title">
                                            <label class="m-checkbox m-checkbox--solid m-checkbox--single m-checkbox--brand ">
                                                    <input type="checkbox" [(ngModel)]="selectedAll" (click)="changeSelectAll()">
                                                    <span></span>
                                                </label>  
                                        <h3 class="m-portlet__head-text">
                                            未分配任务({{instances.length}}) 
                                            
                                        </h3>
                                        
                                    </div>
                                </div>                                  
                                <div class="m-portlet__head-tools">
                                        
                                    <ul class="m-portlet__nav">
                                        <li class="m-portlet__nav-item m-dropdown m-dropdown--inline m-dropdown--arrow m-dropdown--align-right m-dropdown--align-push" m-dropdown-toggle="hover" aria-expanded="true">
                                            <a href="#" class="m-portlet__nav-link m-dropdown__toggle dropdown-toggle btn btn--sm m-btn--pill btn-secondary m-btn m-btn--label-brand">
                                                分配
                                            </a>
                                            <div class="m-dropdown__wrapper" style="z-index: 101;">
                                                <span class="m-dropdown__arrow m-dropdown__arrow--right m-dropdown__arrow--adjust" style="left: auto; right: 37px;"></span>
                                                <div class="m-dropdown__inner">
                                                    <div class="m-dropdown__body">
                                                        <div class="m-dropdown__content">
                                                            <ul class="m-nav">
                                                                <li class="m-nav__section m-nav__section--first">
                                                                    <span class="m-nav__section-text">
                                                                       分配给
                                                                    </span>
                                                                </li>
                                                                <li *ngFor="let worker of workingTeams" class="m-nav__item">
                                                                    <a  class="m-nav__link" (click)="substributeTo(worker.workingTeamId)">
                                                                        <i class="m-nav__link-icon flaticon-share"></i>
                                                                        <span class="m-nav__link-text">
                                                                            {{worker.workingName}}({{worker.numOfTask}}/{{worker.numOfQuantity}})
                                                                        </span>
                                                                    </a>
                                                                </li>
                                                               
                                                            </ul>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                           
                            <div class="m-portlet__body">
                                <div class="tab-content">
                                    <div class="tab-pane active show" id="m_widget2_tab1_content">
                                        <div class="m-widget2">
                                            <div class="m-widget2__item m-widget2__item--primary" *ngFor="let instance of instances" >
                                                <div class="m-widget2__checkbox">
                                                    <label class="m-checkbox m-checkbox--solid m-checkbox--single m-checkbox--brand">
                                                        <input type="checkbox" [(ngModel)]="instance.isSelected" name="ssa">
                                                        <span></span>
                                                    </label>
                                                </div>
                                                <div class="m-widget2__desc">
                                                    <span class="m-widget2__text">
                                                        {{instance.productionDrawingCode}}<br>{{instance.productionSpecial}}<br>{{instance.quantity}}
                                                    </span>
                                                    <br>
                                                    <span class="m-widget2__user-name">
                                                        <a href="#" class="m-widget2__link">
                                                            {{instance.deliveryTime | date:'short'}}
                                                        </a>
                                                    </span>
                                                </div>
                                                <div class="m-widget2__actions">
                                                    <div class="m-widget2__actions-nav">
                                                        {{instance.processStartTime | date:'short'}}
                                                    </div>
                                                </div>
                                            </div>
                                           
                                    </div>
                                    <div class="tab-pane" id="m_widget2_tab2_content"></div>
                                    <div class="tab-pane" id="m_widget2_tab3_content"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                   
        </div>
    </div>




</div>